<template>
  <el-card header="本年度各月份交易记录信息统计">
    <el-table :data="transactionData" border>
      <el-table-column label="" prop="category"></el-table-column>
      <el-table-column label="一月" prop="Jan"></el-table-column>
      <el-table-column label="二月" prop="Feb"></el-table-column>
      <el-table-column label="三月" prop="Mar"></el-table-column>
      <el-table-column label="四月" prop="Apr"></el-table-column>
      <el-table-column label="五月" prop="May"></el-table-column>
      <el-table-column label="六月" prop="Jun"></el-table-column>
      <el-table-column label="七月" prop="Jul"></el-table-column>
      <el-table-column label="八月" prop="Aug"></el-table-column>
      <el-table-column label="九月" prop="Sep"></el-table-column>
      <el-table-column label="十月" prop="Oct"></el-table-column>
      <el-table-column label="十一月" prop="Nov"></el-table-column>
      <el-table-column label="十二月" prop="Dec"></el-table-column>
    </el-table>
  </el-card>
</template>

<script>
import { queryBankReport } from "@/api/welcome/bankwelcome.js";
export default {
  name: "BankWelcome",
  data() {
    return {
      transactionData: [
        {
          category: null,
          Jan: null,
          Feb: null,
          Mar: null,
          Apr: null,
          May: null,
          Jun: null,
          Jul: null,
          Aug: null,
          Sep: null,
          Oct: null,
          Nov: null,
          Dec: null,
        },
        {
          category: null,
          Jan: null,
          Feb: null,
          Mar: null,
          Apr: null,
          May: null,
          Jun: null,
          Jul: null,
          Aug: null,
          Sep: null,
          Oct: null,
          Nov: null,
          Dec: null,
        },
        {
          category: null,
          Jan: null,
          Feb: null,
          Mar: null,
          Apr: null,
          May: null,
          Jun: null,
          Jul: null,
          Aug: null,
          Sep: null,
          Oct: null,
          Nov: null,
          Dec: null,
        },
        {
          category: null,
          Jan: null,
          Feb: null,
          Mar: null,
          Apr: null,
          May: null,
          Jun: null,
          Jul: null,
          Aug: null,
          Sep: null,
          Oct: null,
          Nov: null,
          Dec: null,
        },
      ],
    };
  },

  created() {
    this.getList();
  },
  methods: {
    getList() {
      queryBankReport(this.queryParams).then((response) => {
        var returndata = response.data;
        for (let i = 0; i < returndata.length; i++) {
          this.transactionData[i].category =
            returndata[i].bizTypeZh + "记录(元)";
          this.transactionData[i].Jan = returndata[i].oneCountYuan;
          this.transactionData[i].Feb = returndata[i].twoCountYuan;
          this.transactionData[i].Mar = returndata[i].threeCountYuan;
          this.transactionData[i].Apr = returndata[i].fourCountYuan;
          this.transactionData[i].May = returndata[i].fiveCountYuan;
          this.transactionData[i].Jun = returndata[i].sixCountYuan;
          this.transactionData[i].Jul = returndata[i].sevenCountYuan;
          this.transactionData[i].Aug = returndata[i].eightCountYuan;
          this.transactionData[i].Sep = returndata[i].nineCountYuan;
          this.transactionData[i].Oct = returndata[i].tenCountYuan;
          this.transactionData[i].Nov = returndata[i].elevenCountYuan;
          this.transactionData[i].Dec = returndata[i].twelveCountYuan;
        }
      });
    },
  },
};
</script>
